<!--一级目录组件-->
<template>
  <a-menu-item v-if="valueMap.meta.show" :key="valueMap.name" @click="routerGo">
    <template #icon><component :is="valueMap.meta.icon"></component></template>
    {{ valueMap.meta.title }}
  </a-menu-item>
</template>

<script lang="ts">
import { toRefs } from 'vue';
import importConfigFunction from './deskMenuItem';
import { IconHome } from '@arco-design/web-vue/es/icon';
export default {
  components: {
    IconHome,
  },
  props: {
    data: {
      type: Object,
      default: () => {
        return {};
      },
    },
  },
  setup(props) {
    const { base, init, routerGo } = importConfigFunction(props);
    init();
    return {
      ...toRefs(base),
      routerGo,
    };
  },
};
</script>

<style lang="less" scoped></style>
